# CMakeLists.txt for testCode/testCode

# Create a simple executable without modules (for compatibility)
add_executable(testCode_simple 
    simple_test.cpp
)

set_target_properties(testCode_simple PROPERTIES
    CXX_STANDARD 20
    CXX_STANDARD_REQUIRED ON
    CXX_EXTENSIONS OFF
)

add_custom_target(run_testCode_simple
    COMMAND testCode_simple
    DEPENDS testCode_simple
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    COMMENT "Running testCode_simple executable"
)

# Note: C++20 modules are disabled for now due to compiler compatibility issues
# The module files (*.ixx, *.cppm) are kept for reference but not compiled
# To enable modules, you'll need:
# - MSVC 2019+ with /experimental:module
# - GCC 11+ with -fmodules-ts (experimental)  
# - Clang 12+ with -fmodules (experimental)
# - CMake 3.28+ for proper module support

message(STATUS "C++20 modules are disabled for compatibility. Using testCode_simple executable instead.")
message(STATUS "Module files are preserved for reference: overloading_t.ixx, define_module.cppm")
